
import UIKit
import Moya

enum MYGCaseFileNet {
    case getBloodList(params: [String: Any])//获取血糖列表
    case getBloodPresure(params:[String:Any])//获取血压
    case getHeartInfo(params:[String:Any])//获取心率
}

extension MYGCaseFileNet: MYGTargetType {
    var params: [String : Any] {
        switch self {
        case let .getBloodList(params):
            return params
        case let .getBloodPresure(params):
            return params
        case let .getHeartInfo(params):
            return params
        }
    }
    
    var path: String {
        switch self {
        case .getBloodList:
            "/api/health/blood_sugar"
        case .getBloodPresure:
            "/admin/health/blood_pressure"
        case .getHeartInfo:
            "/api/health/heart_rates"
        }
    }
    
    var method: Moya.Method {
        switch self {
        case .getBloodList,.getBloodPresure,.getHeartInfo:
            .get
        }
    }
}
